package HLSubScreen;

import HLCode.HLRun;
import HLLib.base.HLAppConfig;
import HLLib.base.HLGraphics;
import HLLib.base.HLLoading;

final public class ScreenDemo implements HLISubScreen, HLSubScreenManager_H {
    public ScreenDemo() {

    }

    public void Load() {
        HLAppConfig.appid = 1;
        HLRun.Start();
    }

    public void Logic() {
        if (HLRun.Logic() < 0) {
            HLSubScreenManager.changeSubScreenWithoutTrans(SCREEN_TYPE_NONE);
        }
    }

    public int Render(HLGraphics g) {
        if (HLRun.IsRunning()) {
            if (HLLoading.IsLoading()) {
                HLRun.LoadingRender(g);
                return -1;
            } else {
                HLRun.Render(g);
            }
        }
        return 0;
    }
}